package com.lhg.pattern.creational.singleton;

/**
 * 双检锁/双重校验锁
 *
 * @author Admin
 */
public class Singleton5 {
    private static class SingletonHolder {
        private static final Singleton INSTANCE = new Singleton();
    }
    private Singleton5 (){}
    public static final Singleton getInstance() {
        return SingletonHolder.INSTANCE;
    }
    public void showMessage(){
        System.out.println("Hello World!");
    }
}
